<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>投票信息</title>
<link rel="stylesheet" type="text/css"
	href="/resource/bootstrap.min.css" />
</head>
<body>
	<table class="table">
		<!-- 遍历投票主题 -->
		<c:forEach items="${topics}" var="topic">
			<tr>
				<th colspan="3">${topic.name }</th>
			</tr>
			<!-- 投票项目的头 -->
			<tr>
				<td>选项</td>
				<td>小计</td>
				<td width="350px">比例%</td>
			</tr>
			<!-- 遍历投票项 -->
			<c:forEach items="${topic.items}" var="item">
				<tr>
					<td>${item.name }</td>
					<td>${item.votes }</td>
					<td>
						<div class="progress">
							<div class="progress-bar" role="progressbar"
								style="width:${item.scale }%;" aria-valuenow="${item.scale }"
								aria-valuemin="0" aria-valuemax="100">${item.scale }%</div>
						</div>

					</td>
				</tr>
			</c:forEach>
			<tr>
				<td colspan="3">本题有效填写人次:<font color="red">${topic.total }</font></td>
			</tr>

		</c:forEach>
	</table>


</body>
</html>